//
//  Config.swift
//  Exam-iOS
//
//  Created by 李胜锋 on 2018/1/29.
//  Copyright © 2018年 李胜锋. All rights reserved.

/*
    apple
        3027710490@qq.com
        lh117228Aa
 */
//

import UIKit
import RxCocoa
import RxSwift

let k_screen_width = UIScreen.main.bounds.width
let k_screen_height = UIScreen.main.bounds.height

typealias VoidBlock = () -> Void

class Config {

    private static let shareInstance = Config()
    public static var `default`: Config  {
        return shareInstance
    }
    //主题色
    var themeColor:UIColor = UIColor.lsf_color16(0xF56E77)
    ///标题色
    var blackTextColor = UIColor.lsf_color16(0x111111)
    var grayLineViewColor = UIColor.lsf_color16(0xd3d3d3)
    
    
    let appId = "1357428374"
    #if DEBUG
        let isSandbox = true
        var domain = "http://exam.tophrmimg.com"
        var baseAPI = "http://api.exam.tophrmimg.com/exam/v1/"
    #else
        let isSandbox = false
        var domain = "https://exam.tophrmimg.com"
        var baseAPI = "https://api.exam.tophrmimg.com/exam/v1/"
    #endif
}


///主题色
let k_themeColor = Config.default.themeColor
let k_text_black_color = Config.default.blackTextColor



func safeAreaInsets() -> UIEdgeInsets{
    var edge: UIEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0)
    if #available(iOS 11.0, *) {
        if let window = UIApplication.shared.keyWindow {
            edge = window.safeAreaInsets
        }
    }
    
    return edge
}

